//
//  ViewController.m
//  大图展示
//
//  Created by song on 15/1/8.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *scrollview;

@property (weak, nonatomic) IBOutlet UIImageView *himg;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.scrollview.contentSize = self.himg.image.size;
    self.scrollview.scrollEnabled = YES;
    self.scrollview.userInteractionEnabled =YES; //用户是否可以交互
    self.scrollview.contentInset =UIEdgeInsetsMake(10, 20, 40, 80);
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
   
    }

- (IBAction)scroll {
    
    
    CGPoint  offset = self.scrollview.contentOffset;
    
    offset.x+=10;
    offset.y+= 10;
    
    [self.scrollview setContentOffset:offset animated:YES];
}
@end
